package demo04类和对象的创建;

//一个项目应该只存在一个main方法
public class Application {

    public static void main(String[] args) {

        //类是抽象的，需要实例化
        //类实例化后会返回一个自己的对象
        //student对象就是Student类的具体实例
        Student xiaohong = new Student();
        Student xiaoming = new Student();

        xiaoming.name = "小明";
        xiaoming.age = 3;

        System.out.println(xiaoming.name);
        System.out.println(xiaoming.age);

        xiaohong.name = "小红";
        xiaohong.age = 3;

        System.out.println(xiaohong.name);
        System.out.println(xiaohong.age);

    }

}
